<form id="edit-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('成本单号')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-cost_no" class="form-control" name="row[cost_no]" type="text" value="{$row.cost_no|htmlentities}" readonly>
        </div>
    </div>
    
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('成本类型')}:</label>
        <div class="col-xs-12 col-sm-8">
            <select id="c-cost_type_id" data-rule="required" class="form-control selectpicker" name="row[cost_type_id]" data-live-search="true">
                <option value="">{:__('请选择成本类型')}</option>
                {foreach $costTypeList as $costType}
                <option value="{$costType.id}" {in name="costType.id" value="$row.cost_type_id"}selected{/in}>{$costType.name}</option>
                {/foreach}
            </select>
        </div>
    </div>
    
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('生产计划')}:</label>
        <div class="col-xs-12 col-sm-8">
            <select id="c-plan_id" class="form-control selectpicker" name="row[plan_id]" data-live-search="true">
                <option value="">{:__('请选择生产计划（可选）')}</option>
                {foreach $planList as $plan}
                <option value="{$plan.id}" {in name="plan.id" value="$row.plan_id"}selected{/in}>{$plan.plan_name} - {$plan.order.order_no}</option>
                {/foreach}
            </select>
        </div>
    </div>
    
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('成本金额')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-amount" data-rule="required" class="form-control" name="row[amount]" type="number" value="{$row.amount}" min="0" step="0.01">
        </div>
    </div>
    
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('成本日期')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-cost_date" class="form-control datetimepicker" data-date-format="YYYY-MM-DD" name="row[cost_date]" type="text" value="{$row.cost_date}">
        </div>
    </div>
    
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('成本描述')}:</label>
        <div class="col-xs-12 col-sm-8">
            <textarea id="c-description" data-rule="required" class="form-control" name="row[description]" rows="3">{$row.description|htmlentities}</textarea>
        </div>
    </div>
    
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('备注')}:</label>
        <div class="col-xs-12 col-sm-8">
            <textarea id="c-remark" class="form-control" name="row[remark]" rows="3">{$row.remark|htmlentities}</textarea>
        </div>
    </div>
    
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('状态')}:</label>
        <div class="col-xs-12 col-sm-8">
            <select id="c-status" class="form-control selectpicker" name="row[status]">
                <option value="0" {in name="row.status" value="0"}selected{/in}>待确认</option>
                <option value="1" {in name="row.status" value="1"}selected{/in}>已确认</option>
            </select>
        </div>
    </div>
    
    <div class="form-group layer-footer">
        <label class="control-label col-xs-12 col-sm-2"></label>
        <div class="col-xs-12 col-sm-8">
            <button type="submit" class="btn btn-success btn-embossed disabled">{:__('OK')}</button>
            <button type="reset" class="btn btn-default btn-embossed">{:__('Reset')}</button>
        </div>
    </div>
</form>
